<?php
include_only();

$subtitle_page_content = "<center>";

if(!empty($subtitle_id) and !empty($action) and $action=="open")
{

$subtitle_info = get_subtitle_info($subtitle_id);
$table_name = $subtitle_info['table_name'];
arrange_subtitle_lines_order($table_name);
$current_subtitle_id = $subtitle_info['id'];

}

if(empty($table_name)){$table_name = "";}
if(empty($current_subtitle_id)){$current_subtitle_id="";}

$subtitle_page_content = $subtitle_page_content . "
<script>
function loadsubtitles(table, current_line, save, id, text, start, end, done) {
  getInfo(table,current_line, save, id, text, start, end, done) ;
}
</script>

<script type=\"text/javascript\">
function save_play()
{
jwplayer().seek(20);
}
</script>

</center>


<iframe id='subteditor' src='get_subtitles.php?subtitle_id=1&table_id=".$table_name."&current_subtitle_id=".$current_subtitle_id."' width='100%' height='500px' frameborder='0' scrolling='no' allowtransparency='true'>
  <p>Your browser does not support iframes.</p>
</iframe>
";

?>